import {
  T_Popconfirm,
  T_Cascader,
  T_Search,
  T_Dropdown,
  T_Button,
  T_Select,
  T_Upload,
  T_RangePicker,
  T_Input,
} from './components.js';

const formItemType = (props: any) => {
  switch (props.type) {
    case 'input':
    case 'inputItem':
      return T_Input({ ...props });

      break;
    case 'rangePickerItem':
      return T_RangePicker({ ...props });
      break;
    case '_rangePicker':
      return T_RangePicker({ ...props });
      break;
    case 'select':
    case '_select':
    case 'selectItem':
      return T_Select({ ...props });
      break;
    case 'button':
    case '_button':
      return T_Button({ ...props });
      break;
    case 'popconfirm':
      return T_Popconfirm({ ...props });
      break;
    case 'search':
      return T_Search({ ...props });
      break;
    case 'dropdown':
      return T_Dropdown({ ...props });
      break;
    case 'cascader':
      return T_Cascader({ ...props });
      break;
    case 'upload':
      return T_Upload({ ...props });
      break;
  }
};
export default formItemType;
